fix(i18n): correct Bulgarian grammar for status labels - #127
Merged
Conversation
…rrectly
The queue rendered a single campaign's status as "Завършена" (feminine
singular) right next to "Отменени" (plural), because the same msgid served
both the badge on one row and the filter links that count many items.
Bulgarian and German inflect those two roles differently, so one translation
cannot be right for both.
Badges, type labels and select options that describe a single item now use
_x() with a context ("campaign status", "email status", "campaign type",
"subscriber status", "cron status", "table column header"); the plain strings
stay with the filter links and stat cards and are now consistently plural in
Bulgarian.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
In the campaign queue, the Статус column mixed grammatical forms: one campaign showed as
Завършена(feminine singular, agreeing with кампания) while the next showedОтменени(plural).The cause is not a typo. A single msgid —
Cancelled,Completed,Pending,Sent,Scheduled,One-time,Active, … — is reused for two different jobs:English doesn't inflect, so one string covers both. Bulgarian (and German, for the date columns) cannot. Whichever form the translator picked was wrong in the other place.
Fix
Every string that labels a single item now carries a gettext context via
_x(), so each role can be translated independently. Plain__()stays with the filter links and stat cards, and is now consistently plural in Bulgarian.campaign statusЧакаща,В процес,Завършена,Отменена,Насрочена(feminine singular)email statusЧакащ,Изпратен,Неуспешен,Отменен,Насрочен(masculine singular)subscriber statusАктивен,Неактивен,Отписанcampaign typeЕднократнаcron statusАктивен/Неактивенtable column headerSent/Opened/Scheduleddate columnsИзпратен на,Отворен на,Насрочен заЧакащи,Изпратени,Неуспешни,Отменени,Завършени,Насрочени,Активни,ОтписаниGerman gets the same contexts with its existing wording, plus proper date-column headers (
Gesendet am,Geöffnet am,Geplant für) — without the contexts those msgids would have fallen back to untranslated English..pot,bg_BG.poandde_DE.powere hand-edited (not regenerated, which drops translations) and the.mofiles recompiled withwp i18n make-mo, byte-identical to what the Translations workflow produces.Testing
composer test— 274 passing (269 existing + 5 new)composer phpcs— cleantests/Unit/class-statustranslationstest.phpscans the source for_x()/esc_html_x()/esc_attr_x()calls and fails if any context is missing or untranslated in the.pot,bg_BG.poorde_DE.po, so a future context can't silently ship as English. It also pins the Bulgarian singular badge forms and the plural filter forms against each other.tests/Unit/class-testcase.phpgained stubs for_x(),esc_html_x()andesc_attr_x().Notes
No behaviour, markup or CSS class changes — only which translation function supplies each label.
🤖 Generated with Claude Code